<template>
	<view class="mh-datalis-main" @click="closeDemo" id='modemh'>
		<view class="datalis-list">
			<scroll-view scroll-y="true" @scrolltolower="fetchData" style="height: 44vh;">
				<view class="mx-li" v-for="(val,inx) in data" :key='inx'>
					<view class="mx-title">
						<span class="title-name">{{val.merchant}}</span>
						<span class="title-name" style="color:#f00">{{val.type==1? '已提现':'未提现'}}</span>
					</view>
					<view class="mx-item">
						<image style="width: 100rpx;height: 100rpx;" src="http://static.qlzc.net/1895408479469047808/material/7bf6824d-add4-46f0-8e19-2bf785e41d27.png" mode=""></image>
						<view class="item-right">
							<view class="item-wan">
								<span class="title-name">提现-{{val.account}}</span>
								<span class="title-name" style="color:#f00">+{{val.money}}</span>
							</view>
							<view class="item-tow">
								{{val.createTime}}
							</view>
						</view>
					</view>
				</view>
			</scroll-view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			modeData: {
				type: String,
				required: true,
			},
		},
		data() {
			return {
				data: [{
					merchant: '微信账户',
					createTime: '2025-05-20 12:00:00',
					account: '62270*****0497',
					money: 1000,
					type: 2
				}],
				page: 1,
				pageSize: 10,
				loading: false,
				hasMore: true,

			}
		},
		created() {
			this.fetchData()
		},

		methods: {
			closeDemo(e) {
				let that = this
				if (e.target.id == 'modemh') {
					that.$emit('change', false);
				}

			},
			fetchData(page, pageSize) {
				// 这里替换为实际的API请求
				if (this.loading || !this.hasMore) return;
				this.loading = true;
				try {
					// api.promotionblindboxorderinfoPage({
					// 	current: this.page,
					// 	size: this.pageSize,
					// }).then(res => {
					// 	console.log(res.data.records);
					// 	if (res.data.records.length > 0) {
					// 		this.storeInformation = this.storeInformation.concat(res.data.records);
					// 		console.log(this.storeInformation, 3333);
					// 		this.page++;
					// 	} else {
					// 		this.hasMore = false;
					// 	}
					// })

				} catch (error) {
					console.error('加载数据失败', error);
				} finally {
					this.loading = false;
				}
			},

		}
	}
</script>

<style lang="scss" scoped>
	.mh-datalis-main {
		width: 100%;
		height: 100%;
		position: absolute;
		z-index: 999;
		top: 0;
		left: 0;
		background-color: #0005;
		display: flex;
		justify-content: center;
		align-items: center;

		.datalis-list {
			width: 95%;
			height: 70%;
			background-color: #fff;
			display: flex;
			flex-direction: column;
			padding: 10rpx;
			box-sizing: border-box;

		}
	}

	.mx-li {
		width: 100%;
		height: 260rpx;
		background-color: #2896ff55;
		border-radius: 15rpx;
		margin-bottom: 15rpx;
		padding: 15rpx;
		box-sizing: border-box;
		margin-bottom: 20rpx;

	}

	.mx-title {
		width: 100%;
		height: 80rpx;
		// background-color: #000;
		display: flex;
		justify-content: space-between;
		align-items: center;
		font-weight: bolder;
		border-bottom: 1px solid #0008;
		
	}

	.mx-item {
		width: 100%;
		height: 180rpx;
		// background-color: #000;
		display: flex;
		justify-content: space-between;
		align-items: center;
		font-weight: bolder;
	}
	.item-right{
		flex:1;
		height: 110rpx;
		margin-left: 30rpx;
		display: flex;
		flex-direction: column;
		.item-wan{
			width: 100%;
			height: 60rpx;
			display: flex;
			justify-content: space-between;
			align-items: center;
		}
		.item-tow{
			margin-top: 10rpx;
			width: 100%;
			height: 60rpx;
			display: flex;
			justify-content: flex-start;
			align-items: center;
		}
	}
</style>